package itxinhaimijijia.hierarchicaldecoupling.controller;


import itxinhaimijijia.hierarchicaldecoupling.projo.User;
import itxinhaimijijia.hierarchicaldecoupling.service.UserService;
import itxinhaimijijia.hierarchicaldecoupling.service.impl.UserServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    private UserService userService = new UserServiceImpl();

    @RequestMapping("/list")
    public List<User> List(){
        List<User> userList = userService.findAll();
//        return "list";
        return userList;
    }


}

